#include "httpmessage.h"
#include <string>

using std::string;

//MD5 OF ATTR_NOT_FOUND
const string HTTPMessage::ATTR_NOT_FOUND("4e8b521451e68fe0b80b1cbe094094b9");

HTTPMessage::HTTPMessage()
{
}

HTTPMessage::~HTTPMessage()
{
}

string HTTPMessage::Get(const string& attrName)
{
	HEADER_ITER_T iter = header_.find( attrName );
	if( header_.end() != iter ){
		return header_[ attrName ];
	}else{
		return HTTPMessage::ATTR_NOT_FOUND;
	}
}

string HTTPMessage::operator [](const string& attrName)
{
	return this->Get( attrName );
}
